package com.sxbbc.common.core.enums;

import java.util.ArrayList;
import java.util.List;

import com.sxbbc.common.basics.utils.calculation.CalcuUtils;

/**
 * 冻结状态枚举类
 * 
 * @author xiaoky
 * @date 2019-07-19
 */
public enum FreezeStatusEnums {
	FREEZING(1, "冻结中"),
	SEND(2, "已发放"),
	RETURN(3, "已退款");
	
	private Integer id;

	private String name;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private FreezeStatusEnums(Integer id, String name) {
		this.id = id;
		this.name = name;
	}

	public static List<FreezeStatusEnums> queryList() {
		List<FreezeStatusEnums> list = new ArrayList<FreezeStatusEnums>();
		for (FreezeStatusEnums o : FreezeStatusEnums.values()) {
			list.add(o);
		}
		return list;
	}

	public static String getName(Integer id) {
		String str = "";
		for (FreezeStatusEnums o : FreezeStatusEnums.values()) {
			if (CalcuUtils.getInstance().isEquals(id, o.getId())) {
				str = o.getName();
				break;
			}
		}
		return str;
	}
}
